﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;

namespace BOL
{
    [Serializable]
    public class EstructuraCostoListInfo
    {
        public EstructuraCostoListInfo()
        {
        }
        

        public int idInternal { get; set; }
        public string descripcion { get; set; }
        public decimal montoBase { get; set; }
        public decimal montoOCUso { get; set; }
        public int idObra { get; set; }
        public Moneda moneda { get; set; }
        public int? idPadre { get; set; }
        public string color
        {
            get {
                string col = (montoBase - montoOCUso <= 0 )? "Red" : "Green";
                return col; 
                }

        }
        public string montoStr
        {
            get { return String.Format("{0} {1:N}", this.moneda.simbol, this.montoBase); }

        }
        public string montoOCUsoStr
        {

            get { return String.Format("{0} {1:N}", this.moneda.simbol, this.montoOCUso); }
        }
        public string montoSaldoStr
        {

            get { return String.Format("{0} {1:N}", this.moneda.simbol, (this.montoBase - this.montoOCUso)); }
        }
        
    }
}
